/**
 * 
 */
package systole.domain.signals;

import java.io.Serializable;

/**
 * Represent the final signal, with generated segment and derivates.
 * 
 * @author juan
 * 
 */
public class FinalSignal implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 6139174721047520296L;
    private Integer id;
    private Segment finalSegment;
    private Segment firstDerivatite;
    private Segment secondDerivative;
    private Segment thirdDerivative;
    private Segment fourthDerivative;
    private Segment exponential;

    /**
     *
     * @return The final segment
     */
    public Segment getFinalSegment() {
        return this.finalSegment;
    }

    /**
     *
     * @param finalSegment
     *            The final segment
     */
    public void setFinalSegment(Segment finalSegment) {
        this.finalSegment = finalSegment;
    }

    /**
     * @return id
     */
    public Integer getId() {
        return this.id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return the firstDerivatite
     */
    public Segment getFirstDerivatite() {
        return firstDerivatite;
    }

    /**
     * @param firstDerivatite the firstDerivatite to set
     */
    public void setFirstDerivatite(Segment firstDerivatite) {
        this.firstDerivatite = firstDerivatite;
    }

    /**
     * @return the secondDerivative
     */
    public Segment getSecondDerivative() {
        return secondDerivative;
    }

    /**
     * @param secondDerivative the secondDerivative to set
     */
    public void setSecondDerivative(Segment secondDerivative) {
        this.secondDerivative = secondDerivative;
    }

    /**
     * @return the thirdDerivative
     */
    public Segment getThirdDerivative() {
        return thirdDerivative;
    }

    /**
     * @param thirdDerivative the thirdDerivative to set
     */
    public void setThirdDerivative(Segment thirdDerivative) {
        this.thirdDerivative = thirdDerivative;
    }

    /**
     * @return the fourthDerivative
     */
    public Segment getFourthDerivative() {
        return fourthDerivative;
    }

    /**
     * @param fourthDerivative the fourthDerivative to set
     */
    public void setFourthDerivative(Segment fourthDerivative) {
        this.fourthDerivative = fourthDerivative;
    }

    /**
     * @return the exponential
     */
    public Segment getExponential() {
        return exponential;
    }

    /**
     * @param exponential the exponential to set
     */
    public void setExponential(Segment exponential) {
        this.exponential = exponential;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final FinalSignal other = (FinalSignal) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        if (this.finalSegment != other.finalSegment && (this.finalSegment == null || !this.finalSegment.equals(other.finalSegment))) {
            return false;
        }
        if (this.firstDerivatite != other.firstDerivatite && (this.firstDerivatite == null || !this.firstDerivatite.equals(other.firstDerivatite))) {
            return false;
        }
        if (this.secondDerivative != other.secondDerivative && (this.secondDerivative == null || !this.secondDerivative.equals(other.secondDerivative))) {
            return false;
        }
        if (this.thirdDerivative != other.thirdDerivative && (this.thirdDerivative == null || !this.thirdDerivative.equals(other.thirdDerivative))) {
            return false;
        }
        if (this.fourthDerivative != other.fourthDerivative && (this.fourthDerivative == null || !this.fourthDerivative.equals(other.fourthDerivative))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 41 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 41 * hash + (this.finalSegment != null ? this.finalSegment.hashCode() : 0);
        hash = 41 * hash + (this.firstDerivatite != null ? this.firstDerivatite.hashCode() : 0);
        hash = 41 * hash + (this.secondDerivative != null ? this.secondDerivative.hashCode() : 0);
        hash = 41 * hash + (this.thirdDerivative != null ? this.thirdDerivative.hashCode() : 0);
        hash = 41 * hash + (this.fourthDerivative != null ? this.fourthDerivative.hashCode() : 0);
        return hash;
    }    
   
}
